<!DOCTYPE HTML>
<html lang="zh-hans" >
    <!-- Start book Python基础 -->
<!-- Start book Python基础 -->
    <head>
        <!-- head:start -->
<!-- head:start -->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>多态的使用 | Python基础</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        <meta name="author" content="姜伟">
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="gitbook/style.css">
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-prism/prism.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-splitter/splitter.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    
    <link rel="prev" href="./chapter05.html" />
    

        <!-- head:end -->
<!-- head:end -->
    </head>
    <body>
        <!-- body:start -->
<!-- body:start -->
        
    <div class="book"
        data-level="6"
        data-chapter-title="多态的使用"
        data-filepath="chapter06.md"
        data-basepath="."
        data-revision="Sun Feb 23 2020 13:59:40 GMT+0800 (CST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="./index.html">
                
                        <i class="fa fa-check"></i>
                        
                        学习目标
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="chapter01.html">
            
                
                    <a href="./chapter01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        类方法和实例方法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2" data-path="chapter02.html">
            
                
                    <a href="./chapter02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        单例设计模式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3" data-path="chapter03.html">
            
                
                    <a href="./chapter03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        继承的基本使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4" data-path="chapter04.html">
            
                
                    <a href="./chapter04.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        继承的注意使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5" data-path="chapter05.html">
            
                
                    <a href="./chapter05.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        对象相关的运算符和内置函数
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="6" data-path="chapter06.html">
            
                
                    <a href="./chapter06.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        多态的使用
                    </a>
            
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    本书使用 GitBook 发布
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="./" >Python基础</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h2 id="&#x591A;&#x6001;">&#x591A;&#x6001;</h2>
<p>&#x9762;&#x5411;&#x5BF9;&#x8C61;&#x7684;&#x4E09;&#x5927;&#x7279;&#x6027;&#xFF1A;</p>
<ul>
<li>&#x5C01;&#x88C5;&#xFF1A;&#x8FD9;&#x662F;&#x5B9A;&#x4E49;&#x7C7B;&#x7684;&#x51C6;&#x5219;&#xFF0C;&#x6839;&#x636E;&#x5BF9;&#x8C61;&#x7684;&#x7279;&#x70B9;&#xFF0C;&#x5C06;&#x884C;&#x4E3A;&#x548C;&#x5C5E;&#x6027;&#x62BD;&#x8C61;&#x51FA;&#x6765;&#xFF0C;&#x5C01;&#x88C5;&#x5230;&#x4E00;&#x4E2A;&#x7C7B;&#x4E2D;&#x3002;</li>
<li>&#x7EE7;&#x627F;&#xFF1A;&#x8FD9;&#x662F;&#x8BBE;&#x8BA1;&#x7C7B;&#x7684;&#x6280;&#x5DE7;&#x3002;&#x7236;&#x7C7B;&#x4E0E;&#x5B50;&#x7C7B;&#xFF0C;&#x4E3B;&#x8981;&#x4F53;&#x73B0;&#x5728;&#x4EE3;&#x7801;&#x7684;&#x91CD;&#x7528;&#xFF0C;&#x4E0D;&#x9700;&#x8981;&#x5927;&#x91CF;&#x7684;&#x7F16;&#x5199;&#x91CD;&#x590D;&#x4EE3;&#x7801;&#x3002;</li>
<li>&#x591A;&#x6001;&#xFF1A;&#x4E0D;&#x540C;&#x7684;&#x5B50;&#x7C7B;&#x8C03;&#x7528;&#x76F8;&#x540C;&#x7684;&#x7236;&#x7C7B;&#x65B9;&#x6CD5;&#xFF0C;&#x4EA7;&#x751F;&#x4E0D;&#x540C;&#x7684;&#x6267;&#x884C;&#x7ED3;&#x679C;&#xFF0C;&#x53EF;&#x4EE5;&#x589E;&#x52A0;&#x4EE3;&#x7801;&#x7684;&#x5916;&#x90E8;&#x7075;&#x6D3B;&#x5EA6;&#x3002;&#x591A;&#x6001;&#x662F;&#x4EE5;&#x7EE7;&#x627F;&#x548C;&#x91CD;&#x5199;&#x7236;&#x7C7B;&#x65B9;&#x6CD5;&#x4E3A;&#x524D;&#x63D0;&#x7684;&#xFF0C;&#x5B83;&#x662F;&#x4E00;&#x79CD;&#x8C03;&#x7528;&#x65B9;&#x6CD5;&#x7684;&#x6280;&#x5DE7;&#xFF0C;&#x4E0D;&#x4F1A;&#x5F71;&#x54CD;&#x5230;&#x7C7B;&#x7684;&#x5185;&#x90E8;&#x8BBE;&#x8BA1;&#x3002;</li>
</ul>
<h3 id="&#x573A;&#x666F;">&#x573A;&#x666F;</h3>
<ul>
<li>&#x63D0;&#x4F9B;&#x4E09;&#x4E2A;&#x7C7B;&#xFF1A;&#x7F09;&#x6BD2;&#x72AC;&#x3001;&#x519B;&#x72AC;&#x3001;&#x4EBA;</li>
<li>&#x7F09;&#x6BD2;&#x72AC;--&gt;&#x8FFD;&#x67E5;&#x6BD2;&#x54C1;&#xFF0C;&#x519B;&#x72AC;--&gt;&#x653B;&#x51FB;&#x5047;&#x4EBA;&#xFF0C;&#x4EBA;--&gt;&#x8BA9;&#x5C0F;&#x72D7;&#x5E72;&#x6D3B;</li>
<li>&#x8BBE;&#x8BA1;&#x7C7B;&#x6765;&#x5B8C;&#x6210;&#x529F;&#x80FD;&#x3002;</li>
</ul>
<p><img src="imgs/&#x6CA1;&#x6709;&#x4F7F;&#x7528;&#x591A;&#x6001;.png" alt=""></p>
<p>&#x4EE3;&#x7801;&#x5B9E;&#x73B0;:</p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ArmyDog</span><span class="hljs-params">(object)</span>:</span>

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">bite_enemy</span><span class="hljs-params">(self)</span>:</span>
        print(<span class="hljs-string">&apos;&#x8FFD;&#x51FB;&#x654C;&#x4EBA;&apos;</span>)

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">DrugDog</span><span class="hljs-params">(object)</span>:</span>

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">track_drug</span><span class="hljs-params">(self)</span>:</span>
        print(<span class="hljs-string">&apos;&#x8FFD;&#x67E5;&#x6BD2;&#x54C1;&apos;</span>)

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Person</span><span class="hljs-params">(object)</span>:</span>

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">work_with_army</span><span class="hljs-params">(self, dog)</span>:</span>
        dog.bite_enemy()

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">work_with_drug</span><span class="hljs-params">(self, dog)</span>:</span>
        dog.track_drug()

ad = ArmyDog()
dd = DrugDog()

p = Person()
p.work_with_army(ad)
p.work_with_drug(dd)
</code></pre>
<p>&#x601D;&#x8003;&#xFF1A;&#x8FD9;&#x6BB5;&#x4EE3;&#x7801;&#x8BBE;&#x662F;&#x5426;&#x6709;&#x95EE;&#x9898;&#xFF1F;</p>
<p>&#x65B0;&#x589E;&#x9700;&#x6C42;&#xFF1A;&#x6B64;&#x65F6;&#xFF0C;&#x53C8;&#x591A;&#x4E86;&#x4E00;&#x4E2A;&#x72AC;&#x79CD;&#xFF0C;&#x5C31;&#x53C8;&#x9700;&#x8981;&#x5728;Person&#x7C7B;&#x91CC;&#x65B0;&#x5EFA;&#x4E00;&#x4E2A;&#x65B9;&#x6CD5;&#xFF0C;&#x8BA9;&#x8FD9;&#x4E2A;&#x65B9;&#x6CD5;&#x64CD;&#x4F5C;&#x65B0;&#x7684;&#x72D7;&#x3002;</p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">XiaoTianDog</span><span class="hljs-params">(object)</span>:</span>

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">eat_moon</span><span class="hljs-params">(self)</span>:</span>
        print(<span class="hljs-string">&apos;&#x54EE;&#x5929;&#x72AC;&#x628A;&#x6708;&#x4EAE;&#x5403;&#x4E86;&apos;</span>)

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Person</span><span class="hljs-params">(object)</span>:</span>

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">work_with_xiaotian</span><span class="hljs-params">(self, dog)</span>:</span>  <span class="hljs-comment"># &#x6DFB;&#x52A0;&#x65B9;&#x6CD5;</span>
        dog.eat_moon()
</code></pre>
<p>Person &#x7C7B;&#x603B;&#x662F;&#x4E0D;&#x65AD;&#x7684;&#x6DFB;&#x52A0;&#x65B0;&#x7684;&#x529F;&#x80FD;&#xFF0C;&#x6BCF;&#x6B21;&#x90FD;&#x9700;&#x8981;&#x6539;&#x52A8;Person&#x7C7B;&#x7684;&#x6E90;&#x7801;&#xFF0C;&#x7A0B;&#x5E8F;&#x7684;&#x6269;&#x5C55;&#x6027;&#x592A;&#x5DEE;&#x4E86;&#xFF01;</p>
<ul>
<li>&#x6700;&#x597D;&#x662F;&#x63D0;&#x4F9B;&#x4E00;&#x4E2A;&#x7236;&#x7C7B; Dog&#xFF0C;&#x5177;&#x5907; work &#x7684;&#x529F;&#x80FD;&#xFF0C;&#x5176;&#x4ED6;&#x5C0F;&#x72D7;&#x7EE7;&#x627F;&#x5B83;&#xFF0C;&#x8FD9;&#x6837;&#x53EA;&#x8981;&#x662F;&#x5C0F;&#x72D7;&#x7C7B;&#xFF0C;&#x5219;&#x884C;&#x4E3A;&#x88AB;&#x7EDF;&#x4E00;&#x8D77;&#x6765;&#x4E86;&#xFF0C;&#x6211;&#x4EEC;&#x4EBA;&#x7C7B;&#x5B8C;&#x5168;&#x53EF;&#x4EE5;&#x4FDD;&#x8BC1;&#xFF0C;&#x53EA;&#x8981;&#x662F;&#x5C0F;&#x72D7;&#x7684;&#x5B50;&#x7C7B;&#xFF0C;&#x627E;&#x5B83;&#x5E72;&#x6D3B;&#x80AF;&#x5B9A;&#x4E0D;&#x4F1A;&#x6709;&#x95EE;&#x9898;&#x3002;</li>
<li>&#x8FD9;&#x6837;&#x4EBA;&#x53EA;&#x8981;&#x4E00;&#x4E2A;&#x65B9;&#x6CD5;&#x5C31;&#x80FD;&#x9017;&#x4EFB;&#x610F;&#x79CD;&#x7C7B;&#x7684;&#x72D7;&#x73A9;&#xFF0C;&#x54EA;&#x6015;&#x662F;&#x6DFB;&#x52A0;&#x65B0;&#x7684;&#x72D7;&#xFF0C;&#x4EBA;&#x7684;&#x7C7B;&#x90FD;&#x4E0D;&#x9700;&#x8981;&#x4FEE;&#x6539;&#x3002;</li>
<li>&#x56FE;&#x793A;&#x5982;&#x4E0B;&#xFF1A;</li>
</ul>
<p><img src="imgs/&#x4F7F;&#x7528;&#x591A;&#x6001;.png" alt=""></p>
<p>&#x4EE3;&#x7801;&#x5B9E;&#x73B0;:</p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Dog</span><span class="hljs-params">(object)</span>:</span>

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">work</span><span class="hljs-params">(self)</span>:</span>  <span class="hljs-comment"># &#x7236;&#x7C7B;&#x63D0;&#x4F9B;&#x7EDF;&#x4E00;&#x7684;&#x65B9;&#x6CD5;&#xFF0C;&#x54EA;&#x6015;&#x662F;&#x7A7A;&#x65B9;&#x6CD5;</span>
        <span class="hljs-keyword">pass</span>

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ArmyDog</span><span class="hljs-params">(Dog)</span>:</span>   <span class="hljs-comment"># &#x7EE7;&#x627F; Dog</span>

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">work</span><span class="hljs-params">(self)</span>:</span>  <span class="hljs-comment"># &#x5B50;&#x7C7B;&#x91CD;&#x5199;&#x65B9;&#x6CD5;&#xFF0C;&#x5E76;&#x4E14;&#x5904;&#x7406;&#x81EA;&#x5DF1;&#x7684;&#x884C;&#x4E3A;</span>
        print(<span class="hljs-string">&apos;&#x8FFD;&#x51FB;&#x654C;&#x4EBA;&apos;</span>)

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">DrugDog</span><span class="hljs-params">(Dog)</span>:</span>

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">work</span><span class="hljs-params">(self)</span>:</span>
        print(<span class="hljs-string">&apos;&#x8FFD;&#x67E5;&#x6BD2;&#x54C1;&apos;</span>)

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Person</span><span class="hljs-params">(object)</span>:</span>

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">work_with_dog</span><span class="hljs-params">(self, dog)</span>:</span>
        dog.work()    <span class="hljs-comment"># &#x4F7F;&#x7528;&#x5C0F;&#x72D7;&#x53EF;&#x4EE5;&#x6839;&#x636E;&#x5BF9;&#x8C61;&#x7684;&#x4E0D;&#x540C;&#x800C;&#x4EA7;&#x751F;&#x4E0D;&#x540C;&#x7684;&#x8FD0;&#x884C;&#x6548;&#x679C;, &#x4FDD;&#x969C;&#x4E86;&#x4EE3;&#x7801;&#x7684;&#x7A33;&#x5B9A;&#x6027;</span>

<span class="hljs-comment"># &#x5B50;&#x7C7B;&#x5BF9;&#x8C61;&#x53EF;&#x4EE5;&#x5F53;&#x4F5C;&#x7236;&#x7C7B;&#x6765;&#x4F7F;&#x7528;</span>
dog = Dog()
ad = ArmyDog()
dd = DrugDog()


p = Person()
p.work_with_dog(dog)
p.work_with_dog(ad)  <span class="hljs-comment"># &#x540C;&#x4E00;&#x4E2A;&#x65B9;&#x6CD5;&#xFF0C;&#x53EA;&#x8981;&#x662F; Dog &#x7684;&#x5B50;&#x7C7B;&#x5C31;&#x53EF;&#x4EE5;&#x4F20;&#x9012;&#xFF0C;&#x63D0;&#x4F9B;&#x4E86;&#x4EE3;&#x7801;&#x7684;&#x7075;&#x6D3B;&#x6027;</span>
p.work_with_dog(dd)  <span class="hljs-comment"># &#x5E76;&#x4E14;&#x4F20;&#x9012;&#x4E0D;&#x540C;&#x5BF9;&#x8C61;&#xFF0C;&#x6700;&#x7EC8; work_with_dog &#x4EA7;&#x751F;&#x4E86;&#x4E0D;&#x540C;&#x7684;&#x6267;&#x884C;&#x6548;&#x679C;</span>
</code></pre>
<ul>
<li>&#x6700;&#x7EC8;&#x6548;&#x679C;<ul>
<li>Person &#x7C7B;&#x4E2D;&#x53EA;&#x9700;&#x8981;&#x8C03;&#x7528; Dog &#x5BF9;&#x8C61; work() &#x65B9;&#x6CD5;&#xFF0C;&#x800C;&#x4E0D;&#x5173;&#x5FC3;&#x5177;&#x4F53;&#x662F; &#x4EC0;&#x4E48;&#x72D7;    </li>
<li>work() &#x65B9;&#x6CD5;&#x662F;&#x5728; Dog &#x7236;&#x7C7B;&#x4E2D;&#x5B9A;&#x4E49;&#x7684;&#xFF0C;&#x5B50;&#x7C7B;&#x91CD;&#x5199;&#x5E76;&#x5904;&#x7406;&#x4E0D;&#x540C;&#x65B9;&#x5F0F;&#x7684;&#x5B9E;&#x73B0;</li>
<li>&#x5728;&#x7A0B;&#x5E8F;&#x6267;&#x884C;&#x65F6;&#xFF0C;&#x4F20;&#x5165;&#x4E0D;&#x540C;&#x7684; Dog &#x5BF9;&#x8C61;&#x4F5C;&#x4E3A;&#x5B9E;&#x53C2;&#xFF0C;&#x5C31;&#x4F1A;&#x4EA7;&#x751F;&#x4E0D;&#x540C;&#x7684;&#x6267;&#x884C;&#x6548;&#x679C;</li>
</ul>
</li>
</ul>
<h3 id="&#x591A;&#x6001;&#x603B;&#x7ED3;">&#x591A;&#x6001;&#x603B;&#x7ED3;</h3>
<ul>
<li>&#x5B9A;&#x4E49;&#xFF1A;&#x591A;&#x6001;&#x662F;&#x4E00;&#x79CD;&#x4F7F;&#x7528;&#x5BF9;&#x8C61;&#x7684;&#x65B9;&#x5F0F;&#xFF0C;&#x5B50;&#x7C7B;&#x91CD;&#x5199;&#x7236;&#x7C7B;&#x65B9;&#x6CD5;&#xFF0C;&#x8C03;&#x7528;&#x4E0D;&#x540C;&#x5B50;&#x7C7B;&#x5BF9;&#x8C61;&#x7684;&#x76F8;&#x540C;&#x7236;&#x7C7B;&#x65B9;&#x6CD5;&#xFF0C;&#x53EF;&#x4EE5;&#x4EA7;&#x751F;&#x4E0D;&#x540C;&#x7684;&#x6267;&#x884C;&#x7ED3;&#x679C;</li>
<li>&#x597D;&#x5904;&#xFF1A;&#x8C03;&#x7528;&#x7075;&#x6D3B;&#xFF0C;&#x6709;&#x4E86;&#x591A;&#x6001;&#xFF0C;&#x66F4;&#x5BB9;&#x6613;&#x7F16;&#x5199;&#x51FA;&#x901A;&#x7528;&#x7684;&#x4EE3;&#x7801;&#xFF0C;&#x505A;&#x51FA;&#x901A;&#x7528;&#x7684;&#x7F16;&#x7A0B;&#xFF0C;&#x4EE5;&#x9002;&#x5E94;&#x9700;&#x6C42;&#x7684;&#x4E0D;&#x65AD;&#x53D8;&#x5316;&#xFF01;</li>
<li>&#x5B9E;&#x73B0;&#x6B65;&#x9AA4;&#xFF1A;<ul>
<li>&#x5B9A;&#x4E49;&#x7236;&#x7C7B;&#xFF0C;&#x5E76;&#x63D0;&#x4F9B;&#x516C;&#x5171;&#x65B9;&#x6CD5;</li>
<li>&#x5B9A;&#x4E49;&#x5B50;&#x7C7B;&#xFF0C;&#x5E76;&#x91CD;&#x5199;&#x7236;&#x7C7B;&#x65B9;&#x6CD5;</li>
<li>&#x4F20;&#x9012;&#x5B50;&#x7C7B;&#x5BF9;&#x8C61;&#x7ED9;&#x8C03;&#x7528;&#x8005;&#xFF0C;&#x53EF;&#x4EE5;&#x770B;&#x5230;&#x4E0D;&#x540C;&#x5B50;&#x7C7B;&#x6267;&#x884C;&#x6548;&#x679C;&#x4E0D;&#x540C;</li>
</ul>
</li>
</ul>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="./chapter05.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: 对象相关的运算符和内置函数"><i class="fa fa-angle-left"></i></a>
        
        
    </div>
</div>

        
<script src="gitbook/app.js"></script>

    
    <script src="gitbook/plugins/gitbook-plugin-splitter/splitter.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-copy-code-button/toggle.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"prism":{},"splitter":{},"copy-code-button":{},"toggle-chapters":{},"highlight":{},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        <!-- body:end -->
<!-- body:end -->
    </body>
    <!-- End of book Python基础 -->
<!-- End of book Python基础 -->
</html>
